package aop05;

import org.aspectj.lang.ProceedingJoinPoint;

public class AroundAdvice {
    public Object around(ProceedingJoinPoint proceedingJoinPoint) throws Throwable
    {
        Object result=null;
        try {
            System.out.println("环绕通知—前置通知");
            result = proceedingJoinPoint.proceed();
            System.out.println("环绕通知—后置正常返回通知");
        } catch (Throwable throwable) {
            System.out.println("环绕通知—异常通知");
        } finally {
            System.out.println("环绕通知—后置通知");
        }
        return result;
    }
}
